package presentation;

import java.awt.CardLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;
import javax.swing.JPanel;

public class PanelConteneur extends JPanel {
	private static final long serialVersionUID = 1L;
    PanelConteneur pc;
    //private Menu jpMenu = new Menu(this);
    
    public PanelConteneur(){
            this.pc=this;
            this.setLayout(new CardLayout());
            JPanel separationHoriz = new JPanel();
            separationHoriz.setLayout(new GridLayout(2,2));
            

    }
    
    
    public class ButtonRetourListener implements ActionListener{
            
            public void actionPerformed(ActionEvent ae) {
                    // TODO Auto-generated method stub
                    
                    int retour = JOptionPane.showConfirmDialog(null,
                         "Voulez vous retourner au menu principal ?", 
                         "retour ?",
                         JOptionPane.OK_CANCEL_OPTION);
                    
                    if(retour == JOptionPane.OK_OPTION){
                            CardLayout cl = (CardLayout)(pc.getLayout());
                    cl.show(pc, "Menu");
                    }                               
            }
    }
}
